package com.itstyle.seckill.common.designPattern.mingling;

public class Client {
    public static void main(String[] args) {
        Bulb bulb = new Bulb();
        bulb.on();
        bulb.off();
        System.out.println("--------------------------");
        Switcher switcher = new Switcher();
        switcher.setSwitchable(bulb);
        switcher.buttonOnClick();
        switcher.buttonOffClick();
        switcher.setSwitchable(new Fan());
        switcher.buttonOnClick();
        switcher.buttonOffClick();
    }
}
